import pandas
import pathlib
import os
import tkinter.filedialog
import shutil
import uuid

# 初始的运行路径
InitRunPath = os.getcwd()

# 获取当前脚本所在的路径
CurrentPath = pathlib.Path(__file__).parent.absolute().resolve().__str__()

# 获取当前用户的桌面路径
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop")

# 切换运行路径到脚本所在路径
os.chdir(CurrentPath)

# 获取需要复制文件内容的所在文件夹路径
folder_path = tkinter.filedialog.askdirectory(
    title="选择文件夹",
    initialdir=CurrentPath
)

# 扫描所有需要拷贝复制的 [文件] 以及 [文件夹]
file_direct_path_list = list()
for root, dirs, files in os.walk(folder_path):
    for single_file in files:
        file_direct_path_list.append(os.path.join(root, single_file))
    
    for single_dir in dirs:
        file_direct_path_list.append(os.path.join(root, single_dir))
    break


# 获取增强助手的评价文件夹
folder_path = tkinter.filedialog.askdirectory(
    title="选择 [增强助手 的 评价文件夹]",
    initialdir=CurrentPath
)

# 获取评价文件夹下的所有文件夹
ment_list = list()
for root,dirs,files in os.walk(folder_path):
    for single_dir in dirs:
        path = os.path.join(root,single_dir)
        ment_list.append(path)
    break

# 对每个评价文件夹进行一个文件的输入
for single_path in ment_list:
    file_list = list()
    for single_file_or_direct in file_direct_path_list:
        shutil.copy(single_file_or_direct,single_path)